/* 76 */
/***/
function isNative(value, fixedType) {
  if (typeof fixedType !== 'undefined') {
    if ((typeof value === 'undefined' ? 'undefined' : typeof(value)) === fixedType) {
      return true;
    } else {
      return false;
    }
  } else {
    return (typeof value === 'undefined' ? 'undefined' : typeof(value)) !== 'object' &&
      typeof value !== 'function';
  }
}

function isNumber(value) {
  return typeof value === 'number';
}

function isString(value) {
  return typeof value === 'string';
}

function isBoolean(value) {
  return typeof value === 'boolean';
}

function isArray(value) {
  return Array.isArray(value);
}

function isObject(value) {
  return !Array.isArray && (typeof value === 'undefined' ? 'undefined' : typeof(value)) ===
    'object';
}

function isNativeArray(value, fixedLength, fixedType) {
  return Array.isArray(value) && value.every(function(e) {
    return isNative(e, fixedType);
  }) && (typeof fixedLength === 'undefined' || value.length === fixedLength);
}

function isArrayWithNativeArray(value, fixedLength, fixedInnerArrayLength, fixedInnerArrayType) {
  return Array.isArray(value) && value.every(function(e) {
    return isNativeArray(e, fixedInnerArrayLength, fixedInnerArrayType);
  }) && (typeof fixedLength === 'undefined' || value.length === fixedLength);
}

// electron没有flat这个函数，所以这里加一下！
if (!Array.prototype.flat) {
  console.error("Array.flat is undefined!")
}

export {
  isNative,
  isNumber,
  isString,
  isBoolean,
  isArray,
  isObject,
  isNativeArray,
  isArrayWithNativeArray
}
